<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/6/28
  Time: 18:59
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"  content="MSHTML 6.00.2900.3059" name="GENERATOR"/>
<style type="text/css">
    body{   background-image: url('背景1.png');
        background-size:cover;       }
</style>
<html>
<head>
    <title>$Title$</title>
</head>
<body>
<jsp:include page="header.jsp"></jsp:include>
<!--不再关心无关页面问题，把精力放在业务界面和功能开发上来-->
<script type="text/javascript">
    function changeimg() {

        var btn = document.getElementById("btn");
        var img = document.getElementById("img");
        //防止验证码图片缓存
        img.src = "/webclass/vali?tm" + new Date().getTime();
    }

    //客户端验证
    function valid() {
        var user = document.getElementById("user");
        if (user.value.length == 0) {
            alert("用户名不能为空！");
            user.focus();
            return false;
        }
        if (user.value.length > 15) {
            alert("不能超过15个字符！");
            user.focus();
            return false;
        }
    }
</script>

<style type="text/css">
    ul
    {
        width:500px;

    }
    ul li span {
        display: block;
        height: 30px;
        line-height: 30px;
        width: 180px;
        text-align: right;
        float:left;
    }
    ul li {
        list-style-type: none;
        clear: both;
    }
    .reg{
        margin: 0 auto;
        width: 100%;
    }
</style>
-<div class="reg">
    <span style="font-size:16px;font-weight:bold;text-align: center;display: block;">用户注册</span>
    <hr size="0" style="..." noshade="noshade" />
    <div style="margin: 0 auto; width: 50%;">
        <form action="/webclass/reg" method="post">
<%--           寻找地址有待更改 --%>
            <ul>
                <li><span>用户名：</span>
                    <span><input type="text"
                                 name="username" id="user" onblur="valid()"> </span>
                </li>
                <li><span>邮箱：</span><span><input type="text" name="email" /></span></li>
                <li><span>密码： </span><span><input type="text" name="pwd" /></span></li>
                <li><span>确认密码: </span><span><input type="text" name="repwd" /></span></li>
                <li><span>姓名：</span> <span><input type="text" name="name" /></span></li>
                <li><span>年龄：</span> <span><input type="text" name="age" /></span></li>
                <li><span>请输入验证码： </span><span><input type="text" name="vali" /></span>
                  <span style="width: 140px;float: right;">
                      <img alt="验证码" src="/webclass/vali" id="img" /><a href="javascript:void(0)" onclick="changeimg()">看不清？</a></span>
                </li>
           <li>  <li style="width:100%;text-align: center;display: block;">
                <input type="submit" value="注  册" /><input type="reset" value="重  置" />
            </li>
            </ul>
        </form>
    </div>
</div>
<jsp:include page="foot.jsp"></jsp:include>
</body>

</html>